/*
 * Copyright (c) 2002 Boris Pruessmann and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Common Public License v0.5
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors:
 *    Boris Pruessmann - Initial implementation.
 */
package net.sourceforge.perforce.core;

import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;

/**
  * @version $Revision: 67 $
  * @author  <a href="mailto:bpruessmann@users.sourceforge.net">Boris Pruessmann</a>
  */
public interface IP4TeamProvider 
{
	// ------------------------------------------------------------------------------------- Methods
	
	/** Performs a 'p4 add' operation with the given resources.
	  *
	  * @param resources the resources to add.
	  * @param depth the depth of the operation.
	  * @param monitor the monitor for progress feedback.
	  * @return the status of the operation(s).
	  * 
	  * @throws PerforceException in case of an unexpected error.
	  */
	IStatus openForAdd(IResource[] resources, int depth, IProgressMonitor monitor)
		throws PerforceException;
		
	/** Performs a 'p4 edit' operation with the given resources.
	  *
	  * @param resources the resources to edit.
	  * @param depth the depth of the operation.
	  * @param monitor the monitor for progress feedback.
	  * @return the status of the operation(s).
	  * 
	  * @throws PerforceException in case of an unexpected error.
	  */
	IStatus openForEdit(IResource[] resources, int depth, IProgressMonitor monitor)
		throws PerforceException;	
	
	/** Performs a 'p4 revert' operation with the given resources.
	  *
	  * @param resources the resources to revert.
	  * @param depth the depth of the operation.
	  * @param monitor the monitor for progress feedback.
	  * @return the status of the operation(s).
	  * 
	  * @throws PerforceException in case of an unexpected error.
	  */	
	IStatus revert(IResource[] resources, int depth, IProgressMonitor monitor)
		throws PerforceException;
}
